"use strict";
// enum  枚举  一个一个举例出来
// 作用 : 限制了可选择的可选项
var Colors;
(function (Colors) {
    Colors[Colors["RED"] = 1] = "RED";
    Colors[Colors["YELLOW"] = 2] = "YELLOW";
    Colors[Colors["PINK"] = 3] = "PINK";
    Colors[Colors["GREEN"] = 4] = "GREEN";
})(Colors || (Colors = {}));
// 星期多少
// 性别  男 女 未知
// 影片后缀  .av  .avi  .mp4
function getColor(color) {
    switch (color) {
        case Colors.GREEN:
            console.log('green');
            break;
        case Colors.PINK:
            console.log('pink');
            break;
        case Colors.RED:
            break;
    }
}
getColor(Colors.GREEN);
var SEXType;
(function (SEXType) {
    SEXType[SEXType["MEN"] = 0] = "MEN";
    SEXType[SEXType["WOMAN"] = 1] = "WOMAN";
    SEXType[SEXType["UnKnow"] = 2] = "UnKnow";
})(SEXType || (SEXType = {}));
// type str = number | string;
var personInfo = [];
function getPerson(person, like) {
    for (var i = 0; i < 100; i++) {
        personInfo.push(['萝莉' + i, i, Math.floor(Math.random() * 3)]);
    }
    return personInfo[Math.floor(Math.random() * 101)];
}
var res = getPerson({ name: '小王', age: 20, ID: '123456' }, SEXType.UnKnow);
console.log(res);
// 联合类型 和交叉类型  type
